hysop.operator.kinetic_energy module

@file kinetic energy.py KineticEnergy solver frontend.

class hysop.operator.kinetic_energy.KineticEnergy(velocity, kinetic_energy, variables, rho=None, rho_0=1.0, UdotU=None, implementation=None, base_kwds=None, **kwds)[source]

Bases: Enstrophy

Interface computing kinetic energy using the kinetic energy operators. Available implementations are:

*OPENCL (gpu based implementation)

Initialize a KineticEnergy operator frontend.

KineticEnergy is the scaled volume average of rho*(U.U) on the domain where . represents the vector dot product).

in: U (velocity field)

rho (density field, optional, defaults to 1.0 everywhere)

out: E = 1.0/(2*V*rho_0) * integral(rho*(U.U)) => kinetic energy (scalar parameter)

where V is the domain volume, rho_0 the reference density.

Parameters:
  • velocity (Field) – Input continuous velocity field.

  • kinetic_energy (ScalarParameter) – KineticEnergy scalar output parameter.

  • rho (Field, optional) – Input continuous density field, if not given, defaults to 1.0 on the whole domain.

  • rho_0 (float, optional) – Reference density, defaults to 1.0.

  • UdotU (Field, optional) – Output continuous field if required, will contain rho * (U.U) (term before integration). If UdotU is given, UdotU will contain rho * (U.U) else this will be a temporary field only usable during this operator’s apply method. Should have nb_components=1.

  • variables (dict) – dictionary of fields as keys and topologies as values.

  • implementation (Implementation, optional, defaults to None) – target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().

  • base_kwds (dict, optional, defaults to None) – Base class keywords arguments. If None, an empty dict will be passed.

  • kwds – Extra keywords arguments that will be passed towards implementation operator __init__.